package com.weitu.permission.department.mapper;

import com.weitu.permission.department.entity.Department;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface DepartmentMapper {

    List<Department> findByParentId(@Param("parentId") String parentId);
    
    List<Map> findCodeByParentId(@Param("parentId") String parentId);

    Department findById(@Param("id") String id);

    Department findByCode(@Param("code") String code);

    List<Department> findByUserId(@Param("userId") String userId);

    Department findByCodeAndId(@Param("code") String code, @Param("id") String id);

    List<Department> findByParam(Map paramMap);

    Integer findByParamCount(Map paramMap);

    Integer add(Map paramMap);

    Integer updateById(Map paramMap);

    List<String> selectNamesByIds(List<String> ids);
}

